package com.zker.missyou.dto;/*
 * ClassName: PersonDTO
 * Package : com.zker.missyou.dto
 * Description:
 * @Author zKer
 * @Create 2024/6/28 10:43
 */

import com.zker.missyou.validators.PasswordEquals;
import lombok.Builder;
import lombok.Getter;
import org.hibernate.validator.constraints.Length;


//@AllArgsConstructor // 全参构造方法
//@NoArgsConstructor // 无参构造方法
//@RequiredArgsConstructor  // 有参构造方法
//@Data
@Builder
@Getter
@PasswordEquals(min = 1)
public class PersonDTO {
//    @NonNull
    @Length(min = 2)
    private String name;
    private int age;
    public PersonDTO() {
    }
    public PersonDTO(String name, int age,String password1, String password2) {
        this.name = name;
        this.age = age;
        this.password1 = password1;
        this.password2 = password2;
    }
    //    @Valid
//    private SchoolDTO schoolDTO;
    private String password1;
    private String password2;
}



